﻿decimal orderAmount = 299.99m;

// 用户选择支付宝支付
var context = new PaymentContext(new AlipayStrategy());
context.ExecutePayment(orderAmount);

// 用户临时改为微信支付
context.SetStrategy(new WeChatPayStrategy());
context.ExecutePayment(orderAmount);

// 另一个订单使用银行卡
context = new PaymentContext(new BankCardStrategy());
context.ExecutePayment(150.00m);

// 货到付款订单
context = new PaymentContext(new CashOnDeliveryStrategy());
context.ExecutePayment(99.50m);

Console.WriteLine("策略模式场景演示完成");
